package com.kob.matchingsystem.service.Impl;

import com.kob.matchingsystem.service.MatchingService;
import com.kob.matchingsystem.service.utils.MatchingPool;
import org.springframework.stereotype.Service;

@Service
public class MatchingServiceImpl implements MatchingService {
    //加载匹配池
    public final static MatchingPool matchingPool = new MatchingPool();
    @Override
    public String addPlayer(Integer userId, Integer rating, Integer botId) {
        System.out.println("add player" + userId + " " + rating );
        matchingPool.addPlayer(userId,rating,botId);
        return "add player success" ;
    }

    @Override
    public String removePlayer(Integer userId) {
        System.out.println("remove player " + userId + " ");
        matchingPool.removePlayer(userId);
        return  "remove player success!";
    }
}
